{{ define "main/index.html" }}
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    {{ template "views/header" . }}
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <!-- Main Header -->
    <div class="layui-header">
        <a href="#" class="layui-logo"> <span class="layui-logo-mini">Panzer</span>
            <span class="layui-logo-lg">Melon后台</span>
        </a>
        <a class="side-toggle layui-layout-left" href="#">
            <i class="layui-icon layui-icon-shrink-right"></i>
            <i class="layui-icon layui-icon-spread-left"></i>
        </a>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item"><a class="timo-screen-full" href="#"> <i
                    class="fa layui-icon layui-icon-screen-full"></i>
            </a></li>
            <li class="layui-nav-item timo-nav-user"><a class="timo-header-nickname"><img/>
                <span></span></a>
                <div class="layui-nav-child">
                    <div class="timo-nav-child-box">
                        <div>
                            <a class="open-popup" data-title="个人信息" data-url="/main/user-info" data-size="680,474">
                                <i class="fa fa-user-o"></i> 个人信息
                            </a>
                        </div>
                        <div>
                            <a class="open-popup" data-title="修改密码" data-url="/main/edit-pass" data-size="456,306">
                                <i class="fa fa-lock" style="font-size: 17px; width: 12px;"></i> 修改密码
                            </a>
                        </div>
                        <div>
                            <a onclick="logout()"><i class="fa fa-power-off"></i> 退出登录</a>
                        </div>
                    </div>
                </div>
            </li>
        </ul>
    </div>
    <!-- 左侧导航区域 -->
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <div class="layui-side-user">
                <img class="layui-side-user-avatar" data-size="680,464" src="/assets/images/logo.png" alt="logo"/>
                <div>
                    <p class="layui-side-user-name">超级管理员</p>
                    <p class="layui-side-user-designation">在线</p>
                </div>
            </div>

            <!-- 导航区域 -->
            <ul class="layui-nav layui-nav-tree" lay-filter="layui-nav-side" id="leftmenu">
                <li class="layui-nav-item layui-this"><a lay-url="home"> <i class="layui-icon layui-icon-home"></i>&emsp;
                    <span class="layui-nav-title">主页</span>
                </a></li>
                <li class='layui-nav-item'>
                    <a href="javascript:"> <i aria-hidden='true' class='fa fa-cubes'></i>&emsp;
                        <span class='layui-nav-title'>版本管理</span>
                    </a>
                    <dl class='layui-nav-child'>
                        <dd><a href="javascript:" lay-url='/main/version-config'><i aria-hidden='true' class='fa fa-tag'></i>&emsp;
                                <span class='layui-nav-title'>版本变更</span>
                        </a></dd>
                    </dl>
                    <dl class='layui-nav-child'>
                        <dd><a href="javascript:" lay-url='/main/apk-file-list'><i aria-hidden='true' class='fa fa-database'></i>&emsp;
                                <span class='layui-nav-title'>七牛存储</span>
                        </a></dd>
                    </dl>
                    <dl class='layui-nav-child'>
                        <dd><a href="javascript:" lay-url='/main/my-file-list'><i aria-hidden='true' class='fa fa-shopping-bag'></i>&emsp;
                                <span class='layui-nav-title'>我的七牛</span>
                        </a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-body layui-tab" lay-unauto lay-allowclose="true" lay-filter="iframe-tabs">
        <!-- 标签栏 -->
        <ul class="layui-tab-title">
            <li lay-id="home" lay-url="home" class="layui-this"><i class="layui-icon layui-icon-home"></i> 主页</li>
        </ul>
        <!-- 内容区域-->
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <iframe src="/main/home" class="layui-layout-iframe" style="border: none;"></iframe>
            </div>
        </div>
    </div>

    <!-- 底部固定区域 -->
    <div class="layui-footer">Copyright © 2021 DXHS All Rights Reserved.</div>
    <!-- 移动端遮罩 -->
    <div class="site-mobile-shade"></div>
</div>

{{ template "views/footer" . }}
<script>
    function logout() {
        sessionStorage.removeItem("tabs");
        sessionStorage.removeItem("currentTabId");
        $.post('/logout', function (result) {
            localStorage.removeItem("token");
            window.location.href = '/loginPage';
        });
    }
</script>
</body>
</html>
{{ end }}